//
//  HttpNetHelper.h
//  Kaagad Peso
//
//  Created by ZhengChengFeng on 2024/10/15.
//

#import <Foundation/Foundation.h>

#define kPostMethod @"POST"
#define kGetMethod  @"GET"

NS_ASSUME_NONNULL_BEGIN

typedef void(^HttpSuccessBlock)(NSDictionary *responseDic);
typedef void(^HttpFailureBlock)(NSError *error);
typedef void(^ProgressBlock)(double pro);

@interface HttpNetHelper : NSObject

+ (void)getNetworkHelperForPath:(NSString *)path parameter:(NSMutableDictionary *)parameters onCompleteSuccess:(HttpSuccessBlock)successNetBlock onCompleteFailur:(HttpFailureBlock)failureNetBlock withIsForm:(BOOL)isForm;

+ (void)postNetworkHelperForPath:(NSString *)path parameter:(NSMutableDictionary *)parameters onCompleteSuccess:(HttpSuccessBlock)successNetBlock onCompleteFailur:(HttpFailureBlock)failureNetBlock withIsForm:(BOOL)isForm;

+ (void)postUploadPhotoUrl:(NSString *)url params:(NSDictionary *)params imageData:(NSData *)imgData name:(NSString *)name fileName:(NSString *)fileName mimeType:(NSString *)mimeType withProgress:(ProgressBlock)progress success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure;

@end

NS_ASSUME_NONNULL_END
